<ui:composition template="/WEB-INF/templates/employee/base.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:define name="title">Prodotti</ui:define>

	<ui:define name="content">
		<h:form>
			<p:tabView id="tabView">
				<p:tab id="transport" title="Trasporto" >
					<p:fragment autoUpdate="true">
						<ui:repeat var="transport" value="#{transportBean.transports}">
							<p:panelGrid columns="2" style="width: 100%; margin: 10px 0">  
								<f:facet name="header">  
									<h:outputText value="#{transport.name}" /> 
								</f:facet>  
		      
		        				<h:outputText value="Descrizione:" />
								<h:outputText value="#{transport.description}" />
								<h:outputText value="Prezzo:" />
								<h:outputText value="#{transport.price}" />
								<h:outputText value="Origine:" />
								<h:outputText value="#{transport.origin}" />
								<h:outputText value="Destinazione:" />
								<h:outputText value="#{transport.destination}" />
								<h:outputText value="Tipo:" />
								<h:outputText value="#{transport.type}" />  
		      
								<f:facet name="footer">  
									<p:commandButton value="Elimina" action="#{transportBean.removeTransport(transport)}" />
								</f:facet>  
							</p:panelGrid> 
						</ui:repeat>
					</p:fragment>
				</p:tab>
				<p:tab id="accomodation" title="Alloggio">
					<p:fragment autoUpdate="true">
						<ui:repeat var="accomodation" value="#{accomodationBean.accomodations}">
							<p:panelGrid columns="2" style="width: 100%; margin: 10px 0">  
								<f:facet name="header">  
									<h:outputText value="#{accomodation.name}" /> 
								</f:facet>  
		      
		        				<h:outputText value="Descrizione:" />
								<h:outputText value="#{accomodation.description}" />
								<h:outputText value="Prezzo:" />
								<h:outputText value="#{accomodation.price}" />
								<h:outputText value="Città:" />
								<h:outputText value="#{accomodation.city}" />
								<h:outputText value="Tipo:" />
								<h:outputText value="#{accomodation.type}" />  
		      
								<f:facet name="footer">  
									<p:commandButton value="Elimina" action="#{accomodationBean.removeAccomodation(accomodation)}" />
								</f:facet>  
							</p:panelGrid> 
						</ui:repeat>
					</p:fragment>
				</p:tab>
				<p:tab title="Attività" id="activityTab">
					<p:fragment autoUpdate="true">
						<ui:repeat var="activity" value="#{activityBean.activities}">
							<p:panelGrid columns="2" style="width: 100%; margin: 10px 0">
								<f:facet name="header">  
									<h:outputText value="#{activity.name}" /> 
								</f:facet>  
		      
		        				<h:outputText value="Descrizione:" />
								<h:outputText value="#{activity.description}" />
								<h:outputText value="Prezzo:" />
								<h:outputText value="#{activity.price}" />
								<h:outputText value="Città:" />
								<h:outputText value="#{activity.city}" />
								<h:outputText value="Tipo:" />
								<h:outputText value="#{activity.type}" />  
		      
								<f:facet name="footer">  
									<p:commandButton value="Elimina" action="#{activityBean.removeActivity(activity)}" />
								</f:facet>  
							</p:panelGrid> 
						</ui:repeat>
					</p:fragment>
				</p:tab>
			</p:tabView>
		</h:form>
	</ui:define>
</ui:composition>